package dao.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import  dao.IDao;
import  dao.inter.IProductDao;
import  entity.Product;
@Repository
public class ProductDaoImpl implements IProductDao {
	@Autowired
	private IDao<Product> idao;

	@Override
	public Product save(Product obj) {
		return idao.save(obj);
	}

	@Override
	public boolean update(Product obj) {
		return idao.update(obj);
	}

	@Override
	public boolean delete(String rowid) {
		return idao.delete(Product.class, rowid);
	}

	@Override
	public Product queryById(String rowid) {
		return idao.queryById(Product.class, rowid);
	}
	@Override
	public List<Product> queryBySql(String sql) {
		return idao.queryBySql(Product.class,sql);
	}

	@Override
	public List<Product> queryByHql(String hql, Object[] values) {
		// TODO Auto-generated method stub
		return idao.queryByHql(hql, values);
	}
}
